import request from '@/utils/request.js'
import api from './apis.js'

export function getWarnList (params) {
	return request(api.WarnList, 'GET', params)
}

export function getWarnCnt (params) {
	return request(api.GetCntByProject, 'GET', params)
}

export function getDeviceCodesByProjectId (params) {
	return request(api.GetDeviceCodesByProjectIdAndDeviceType, 'GET', params)
}

export function getDustNoise (params) {
	return request(api.GetDustNoise, 'GET', params)
}
// 一周预警
export function getOneWeekAlert (params) {
	return request(api.GetOneWeekAlert, 'GET', params)
}
export function deviceInfo (data) {
	return request(`${api.DeviceInfo}?deviceNo=${data.deviceNo}&searchField=${data.searchField}`, 'POST')
}
// 历史
export function singleDeviceLineList (ids, searchFields, params) {
	return request(`${api.SingleDeviceLineList}?areaIds=${ids}&searchFields=${searchFields}&${params}`, 'POST')
}